package com.njym.java.security.app.mapper;

import com.njym.java.security.app.entity.CourseSection;
import com.njym.java.security.app.entity.CourseSectionVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 
 * 
 * @author Mr.AG
 * @email 463540703@qq.com
 * @date 2019-11-07 16:46:27
 */

public interface CourseSectionMapper extends Mapper<CourseSection> {

    List<CourseSection> select_365();

    List<CourseSection> selectFrees(@Param("classId") Integer classId);

    List<CourseSection> get_freeSections(@Param("classId") Integer classId);

    List<CourseSection> get_sectionsByCouid(@Param("couId") Integer couId);

    List<CourseSectionVo> get_5_freeSections();

    List<CourseSection> get_sectionsByClassId(@Param("classId") Integer classId);

    List<CourseSection> get_2_FreeSections_ByclassId(@Param("classId") Integer classId);

    void setPlayTimes();

    List<CourseSection> select_jyly_haveGotten(@Param("userId") Integer userId, @Param("courseId") Integer courseId);

    List<CourseSection> select_jyly_neverGotten(@Param("userId") Integer userId, @Param("courseId") Integer courseId);

    List<CourseSection> select_AiTing(@Param("courseId") Integer courseId);

    List<CourseSectionVo> selectAllFree(@Param("classId") Integer classId);

    CourseSection codeBycou(int couId);

    void updatePlayTimes(@Param("id") Integer id, @Param("times") Integer times);

}
